package com.example.gzip.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Author zhaowei
 * @Description
 * @Date 2021/11/18 22:20
 * @Param
 * @return
 **/
@RestController
@RequestMapping("test")
public class TestController {

    @GetMapping("/list")
    public List<Map<String,Object>> listByListMap() {

        List<Map<String,Object>> list = new ArrayList<>();
        Map<String, Object> item ;

        for (int i = 0; i < 200000; i++) {
            item = new HashMap<>();
            item.put("id",i+1);
            item.put("lon",111.11111);
            item.put("lat",22.22222);
            list.add(item);
        }
        return list;
    }

}
